@Controller
@RequestMapping("/${capitalize!"defaultValue"}")
public class ${capitalize2!"defaultValue"}Controller {

@Autowired
private I${capitalize2!"defaultValue"}Service ${capitalize!"defaultValue"}Service;

@RequestMapping("/list")
public String list(Model model, @ModelAttribute("qo") QueryObject qo){
PageInfo<${capitalize2!"defaultValue"}> pageInfo = ${capitalize!"defaultValue"}Service.query(qo);
model.addAttribute("pageInfo", pageInfo);
return "${capitalize!"defaultValue"}/list";
}

@RequestMapping("/delete")
public String delete(Long id) {
if (id != null) {
${capitalize!"defaultValue"}Service.delete(id);
}
return "redirect:/${capitalize!"defaultValue"}/list";
}

@RequestMapping("/saveOrUpdate")
public String saveOrUpdate(${capitalize2!"defaultValue"} ${capitalize!"defaultValue"}) {
if (${capitalize!"defaultValue"}.getId() == null) {
${capitalize!"defaultValue"}Service.save(${capitalize!"defaultValue"});
} else {
${capitalize!"defaultValue"}Service.update(${capitalize!"defaultValue"});
}
return "redirect:/${capitalize!"defaultValue"}/list";
}

@RequestMapping("/input")
public String input(Long id, Model model) {
if (id != null) {
model.addAttribute("${capitalize!"defaultValue"}",${capitalize!"defaultValue"}Service.get(id));
}
return "${capitalize!"defaultValue"}/input";
}
}